package itdfq.dfq.Behavior_Patters.visitor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author GocChin
 * @Date 2021/5/25 16:03
 * @Blog: itdfq.com
 * @QQ: 909256107
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("18031210111  段方钦");
        List<Course> courseList = new ArrayList<Course>();

        FreeCourse freeCourse = new FreeCourse();
        freeCourse.setName("SpringMVC数据绑定");
        CodingCourse codingCourse = new CodingCourse();
        codingCourse.setName("Java设计模式精讲 -- By Geely");
        codingCourse.setPrice(299);

        courseList.add(freeCourse);
        courseList.add(codingCourse);

        for(Course course : courseList){
            course.accept(new Visitor());
        }
    }

}
